package com.bml.architect.seata.controller;

import com.bml.architect.seata.service.StorageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: baiml
 * @Title: StorageController
 * @ProjectName: 中台技术平台
 * @Depart 中台研发部
 * @Description:
 * @date: 2021/5/12 9:05
 */
@RestController
@RequestMapping("/storage/")
public class StorageController {

    @Autowired
    private StorageService storageService;

    @GetMapping("/deduct")
    public Boolean deduct(@RequestParam("commodityCode") String commodityCode, @RequestParam("count") Integer count){

        return storageService.deduct(commodityCode,count);
    }
}
